<?php
include_once("../../../common/module/checkA.php");
include_once("../../../../config.php");
include_once("../controller/detail-list.php");
?>



<?
//获取本页用到的单位的名字
$unit_nid_list=transform_2darray_in_1darray_with_new_key($detail,"nid","unit");
$unit_nid_list_str=implode("','",$unit_nid_list);
$unit_list=select_lines_all_items($table_Prefix."unit","","nid in ('".$unit_nid_list_str."')","");
$unit_name_list=transform_2darray_in_1darray_with_new_key($unit_list,"nid","sname");
?>
 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <?php include ROOT_PATH_.'/controller/common/module/head.php'; ?>
    <?php include 'modules/head.php'; ?>
    <link href="../asset/css/style.css" rel="stylesheet" type="text/css"/>
</head>

<body>

<div id="topbar">
    <?php include ROOT_PATH_.'/controller/common/module/topbar.php'; ?>
</div>

<div id="container" class="<? echo $system_part ?>">


        <div id="sidebar">
            <?php include ROOT_PATH_.'/controller/common/module/sidebar.php'; ?>
        </div>




<div id="content">


    <!--标题设定-->
    <?php $page_title='续费跟踪';?>
    <?php include $_SERVER['DOCUMENT_ROOT']. '/controller/common/module/mod-page-title.php'; ?>



    <!--搜索框-->
    <?php include 'module/mod-search.php'; ?>












<!-- 用$system_part .list_boxes来控制来到确认板块信息显示-->
    <!-- 用$system_part .list_boxes来控制来到确认板块信息显示-->
    <div class="list-box">



<div class="list-boxes layui-form">



<table class="layui-table">
  <colgroup>
    <col width="80">
	<col >
	<col > 
	<col > 
	<col >
	<col >
	<col >
    <col width="330">

  </colgroup>
  <thead>
    <tr>
      <th>序号</th>
      <th>账号</th>
      <th>所属</th>
      <th>状态</th>
      <th>续费日期</th>
      <th>类型</th>
      <th>金额</th>
      <th>操作</th>

    </tr> 
  </thead>
  <tbody>





<?php
for ($i = 0; $i < $_quantity_per_page; $i++) {
?>




<tr id="item<?echo $detail[$i]['nid']?>" <?if($applymodify['nid']){echo "style='color:red'";$status="审核中";}else{$status="正常";}?>>


<td><?echo $i+1+$plate['page_list_num']*($nowpageid-1) ?></td>
<td><?echo $detail[$i]['name']?></td>
<td><?echo $unit_name_list[$detail[$i]['unit']]?>  </td>

<td>
    <span <?if($detail[$i]['status']=='进行中') {echo "style='border-radius: 5px;background-color:#009e94;padding: 2px 5px;color: #ffffff;'";}?>>
        <?echo $detail[$i]['status']?>
    </span></td>

<td>
    <?echo substr($detail[$i]['next_enddate'],0,10)?>  /
    <span style="<? if(count_days(date("Y-m-d"),$detail[$i]['next_enddate']) < 15 ) { echo "background-color: red;
    border-radius: 5px;
    padding: 2px 5px;
    color: #ffffff;";}?>">
        <?echo count_days(date("Y-m-d"),$detail[$i]['next_enddate'])?> 日
    </span>
</td>

<td><?echo $detail[$i]['type']?></td>
<td><?echo $detail[$i]['sum']?> </td>

<td>


    <a target="_black" href="detail-log-list.php?&nid=<? echo $detail[$i]['nid']?><?echo $pagenumber_url.$sortby_url.$navitemed_url.$system_part.$term_nid ?><?echo $url_str?>"
       class="layui-btn layui-btn-primary layui-btn-sm">文书</a>


<a href="detail-log-add.php?&nid=<? echo $detail[$i]['nid']?><?echo $pagenumber_url.$sortby_url.$navitemed_url.$system_part.$term_nid ?><?echo $url_str?>"
   class="layui-btn  layui-btn-sm">续费</a>


<? if(in_array("admin",$quanxian)){?>
        <a href="detail-edit.php?nid=<? echo $detail[$i]['nid']?><?echo $pagenumber_url.$sortby_url.$navitemed_url.$system_part.$term_nid ?>" class="layui-btn  layui-btn-sm" >
           修改
        </a>

        <a href="javascript:void(0)" onclick="delItem (<?php echo $detail[$i]['nid']?>)"
           class="delete layui-btn  layui-btn-sm" >
           删除 </a>
<?}?>

    <a href="<?echo $detail[$i]['visit']?>/api/update_host_domain_date.php?type=<?echo $detail[$i]['type']?>&start=<?echo $detail[$i]['startdate']?>&end=<?echo $detail[$i]['next_enddate']?>"
       class="layui-btn layui-btn-primary layui-btn-sm" target="_blank"  >同步</a>

  </td>
    </tr>
<?}?>

 
  </tbody>
</table>




 

</div>


        <!-- todo 这里需要做0判断-->
        <!-- 翻页代码-->
        <?php include ROOT_PATH_ . '/controller/common/module/mod_page_numbers.php'; ?>




<!--list-box end-->
</div>

<!--content端點01-->

<br class="clearfloat"/>
</div>
<!--container端點01-->
</div>







<!--删除box-->
<?php include '../modules/deletebar.php'; ?>
<!--删除box end-->

<?php include ROOT_PATH_ . "/controller/common/module/footer.php"; ?>
</body>
</html>